﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Sector7.Medical.EntityType;
using Sector7.Framework.Core;
using Sector7.Framework.EntityType;

namespace Sector7.Medical.Services
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IInformationService”。
    [ServiceContract]
    public interface IInformationService
    {
        #region /// DrugType

        /// <summary>
        /// 获取所有药品类型树形列表
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_DrugType> GetDrugTypeList();

        /// <summary>
        /// 添加药品分类
        /// </summary>
        /// <param name="drugType"></param>
        /// <returns></returns>
        [OperationContract]
        int AddDrugType(M7_DrugType drugType);

        /// <summary>
        /// 修改药品类型
        /// </summary>
        /// <param name="delta"></param>
        /// <returns></returns>
        [OperationContract]
        int UpdateDrugType(EntityDeltaBase delta);

        /// <summary>
        /// 删除药品类型
        /// </summary>
        /// <param name="drugTypeId"></param>
        /// <returns></returns>
        [OperationContract]
        int DeleteDrugType(int drugTypeId);

        #endregion

        #region /// Unit

        /// <summary>
        /// 添加单位
        /// </summary>
        /// <param name="unit"></param>
        /// <returns></returns>
        [OperationContract]
        int AddUnit(M7_Unit unit);

        /// <summary>
        /// 根据特殊标志获取单位列表
        /// </summary>
        /// <param name="flags">单位标志</param>
        /// <returns></returns>
        [OperationContract]
        List<M7_Unit> GetUnitListByFlags(int flags);

        /// <summary>
        /// 获取单位列表
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_Unit> GetUnitList();

        /// <summary>
        /// 更新单位
        /// </summary>
        /// <param name="delta"></param>
        /// <returns></returns>
        [OperationContract]
        int UpdateUnit(EntityDeltaBase delta);

        /// <summary>
        /// 删除单位
        /// </summary>
        /// <param name="unitId"></param>
        /// <returns></returns>
        [OperationContract]
        int DeleteUnit(int unitId);

        #endregion

        #region /// DrugForm

        /// <summary>
        /// 获取剂型列表
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_DrugForm> GetDrugFormList();

        #endregion

        #region /// DrugRegType

        /// <summary>
        /// 获取医药产品注册类型列表
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_DrugRegType> GetDrugRegTypeList();

        #endregion
        
        #region /// Vendor

        /// <summary>
        /// 获取供货商列表
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_Vendor> GetVendorList();

        /// <summary>
        /// 添加供货商
        /// </summary>
        /// <param name="vendor"></param>
        /// <returns></returns>
        [OperationContract]
        object AddVendor(M7_Vendor vendor);

        /// <summary>
        /// 修改供货商
        /// </summary>
        /// <param name="delta"></param>
        /// <returns></returns>
        [OperationContract]
        int SetVendor(EntityDeltaBase delta);

        /// <summary>
        /// 删除供货商
        /// </summary>
        /// <param name="vendorId"></param>
        /// <returns></returns>
        [OperationContract]
        int DeleteVendor(long vendorId);

        #endregion

        #region /// Drug

        /// <summary>
        /// 添加药品
        /// </summary>
        /// <param name="drug">药品信息</param>
        /// <returns></returns>
        [OperationContract]
        long AddDrug(M7_Drug drug);

        /// <summary>
        /// 更新药品
        /// </summary>
        /// <param name="delta"></param>
        /// <returns></returns>
        [OperationContract]
        int UpdateDrug(EntityDeltaBase delta);

        /// <summary>
        /// 根据药品名称获取记录条数
        /// </summary>
        /// <param name="drugName"></param>
        /// <returns></returns>
        [OperationContract]
        int CountByDrugName(string drugName);

        /// <summary>
        /// 根据种类特性获取药品列表
        /// </summary>
        /// <param name="natureTypeId">种类特性</param>
        /// <returns></returns>
        [OperationContract]
        List<M7_Drug> GetDrugListByNatureTypeId(int natureTypeId);

        /// <summary>
        /// 根据关键字获取药品列表（药品编号、药品名称、拼音码）
        /// </summary>
        /// <param name="keywords"></param>
        /// <returns></returns>
        [OperationContract]
        List<M7_Drug> GetDrugListByKeywords(string keywords);

        /// <summary>
        /// 删除药品
        /// </summary>
        /// <param name="drugId"></param>
        /// <returns></returns>
        [OperationContract]
        int DeleteDrug(long drugId);

        #endregion

        #region /// Department

        /// <summary>
        /// 根据科室标志获取所有科室信息
        /// </summary>
        /// <param name="flags">科室标志</param>
        /// <returns></returns>
        [OperationContract]
        List<M7_Department> GetDepartmentList(int flags);

        /// <summary>
        /// 根据科室复合标志获取所有科室信息
        /// </summary>
        /// <param name="comflags">科室复合标志</param>
        /// <returns></returns>
        [OperationContract]
        List<M7_Department> GetDepartmentListByComflags(int comflags);

        /// <summary>
        /// 添加科室
        /// </summary>
        /// <param name="department">科室信息</param>
        /// <returns></returns>
        [OperationContract]
        object AddDepartment(M7_Department department);

        /// <summary>
        /// 编辑科室
        /// </summary>
        /// <param name="department">科室信息</param>
        /// <returns></returns>
        [OperationContract]
        int UpdateDepartment(EntityDeltaBase delta);

        /// <summary>
        /// 编辑二级科室Flags
        /// </summary>
        /// <param name="parentDeptId">一级科室ID</param>
        /// <param name="flags">标志</param>
        /// <returns></returns>
        [OperationContract]
        int UpdateSubDepartmentFlags(int parentDeptId, int flags);

        /// <summary>
        /// 删除科室
        /// </summary>
        /// <param name="departmentId">科室信息ID</param>
        /// <returns></returns>
        [OperationContract]
        int DeleteDepartment(int departmentId);
        #endregion

        #region ///Sick Area

        /// <summary>
        /// 获取所有病区信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_SickArea> GetSickAreaList();

        /// <summary>
        /// 添加病区
        /// </summary>
        /// <param name="area">病区信息</param>
        /// <returns></returns>
        [OperationContract]
        object AddSickArea(M7_SickArea area);

        /// <summary>
        /// 编辑病区
        /// </summary>
        /// <param name="delta">病区信息</param>
        /// <returns></returns>
        [OperationContract]
        int UpdateSickArea(EntityDeltaBase delta);

        /// <summary>
        /// 删除病区
        /// </summary>
        /// <param name="areaId">病区ID</param>
        /// <returns></returns>
        [OperationContract]
        int DeleteSickArea(int areaId);
        #endregion

        #region ///Sick Room

        /// <summary>
        /// 获取所有病房信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_SickRoom> GetSickRoomList();

        /// <summary>
        /// 添加病房
        /// </summary>
        /// <param name="area">病房信息</param>
        /// <returns></returns>
        [OperationContract]
        object AddSickRoom(M7_SickRoom room);

        /// <summary>
        /// 编辑病房
        /// </summary>
        /// <param name="delta">病房信息</param>
        /// <returns></returns>
        [OperationContract]
        int UpdateSickRoom(EntityDeltaBase delta);

        /// <summary>
        /// 删除病房
        /// </summary>
        /// <param name="areaId">病房ID</param>
        /// <returns></returns>
        [OperationContract]
        int DeleteSickRoom(int roomId);
        #endregion

        #region ///Sick Bed

        /// <summary>
        /// 获取所有病床信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_SickBed> GetSickBedList();

        /// <summary>
        /// 根据病区获取所有病床信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_SickBed> GetSickBedListByAreaId(int areaId);

        /// <summary>
        /// 根据病区和科室获取所有病床信息
        /// </summary>
        /// <param name="areaId"></param>
        /// <param name="deptId"></param>
        /// <returns></returns>
        [OperationContract]
        List<M7_SickBed> GetSickBedListByAreaDeptId(int areaId, int deptId);

        /// <summary>
        /// 添加病床
        /// </summary>
        /// <param name="area">病床信息</param>
        /// <returns></returns>
        [OperationContract]
        object AddSickBed(M7_SickBed bed);

        /// <summary>
        /// 编辑病床
        /// </summary>
        /// <param name="delta">病床信息</param>
        /// <returns></returns>
        [OperationContract]
        int UpdateSickBed(M7_SickBed bed);

        /// <summary>
        /// 删除病床
        /// </summary>
        /// <param name="areaId">病床ID</param>
        /// <returns></returns>
        [OperationContract]
        int DeleteSickBed(int bedId);
        #endregion

        #region ///Sick BedLevel
        /// <summary>
        /// 获取所有病床等级信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_SickBedLevel> GetSickBedLevelList();

        /// <summary>
        /// 添加病床等级信息
        /// </summary>
        /// <param name="area">病床等级信息</param>
        /// <returns></returns>
        [OperationContract]
        object AddSickBedLevel(M7_SickBedLevel bedLevel);

        /// <summary>
        /// 编辑病床等级信息
        /// </summary>
        /// <param name="delta">病床等级信息</param>
        /// <returns></returns>
        [OperationContract]
        int UpdateSickBedLevel(EntityDeltaBase delta);

        /// <summary>
        /// 删除病床等级信息
        /// </summary>
        /// <param name="areaId">病床等级信息ID</param>
        /// <returns></returns>
        [OperationContract]
        int DeleteSickBedLevel(int bedLevelId);
        #endregion

        #region ///Charge Items

        /// <summary>
        /// 获取收费项目
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        M7_ChargeItem GetChargeItem(int chargItemId);

        /// <summary>
        /// 获取所有所有收费项目
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_ChargeItem> GetChargeItemList();

        /// <summary>
        /// 添加收费项目
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        object AddChargeItem(M7_ChargeItem chargeItem);

        /// <summary>
        /// 修改收费项目
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        int UpdateChargeItem(EntityDeltaBase delta);

        /// <summary>
        /// 删除收费项目
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        int DeleteChargeItem(int itemId);
        #endregion

        #region ///RegistryFee
        /// <summary>
        /// 获取所有挂号费信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_RegistryFee> GetRegistryFeeList();

        /// <summary>
        /// 添加挂号费信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        object AddRegistryFee(M7_RegistryFee registryFee);

        /// <summary>
        /// 修改挂号费信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        int UpdateRegistryFee(EntityDeltaBase delta);

        /// <summary>
        /// 删除挂号费信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        int DeleteRegistryFee(int feeId);
        #endregion

        #region ///Employee Group

        /// <summary>
        /// 获取所有员工组信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_EmployeeGroup> GetEmployeeGroupList();

        /// <summary>
        /// 添加员工组
        /// </summary>
        /// <param name="employeeGroup">员工组信息</param>
        /// <returns></returns>
        [OperationContract]
        object AddEmployeeGroup(M7_EmployeeGroup employeeGroup);

        /// <summary>
        /// 编辑员工组
        /// </summary>
        /// <param name="delta">员工组信息</param>
        /// <returns></returns>
        [OperationContract]
        int UpdateEmployeeGroup(EntityDeltaBase delta);

        /// <summary>
        /// 删除员工组
        /// </summary>
        /// <param name="employeeGroupId">员工组ID</param>
        /// <returns></returns>
        [OperationContract]
        int DeleteEmployeeGroup(int employeeGroupId);
        #endregion

        #region ///Employee

        /// <summary>
        /// 获取所有员工信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_Employee> GetEmployeeList();

        /// <summary>
        /// 获取所有医生
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_Employee> GetDoctorOrSpecialist();

        /// <summary>
        /// 根据唯一标识符获取员工信息
        /// </summary>
        /// <param name="uniqueId"></param>
        /// <returns></returns>
        [OperationContract]
        M7_Employee GetEmployee(string uniqueId);

        /// <summary>
        /// 添加员工
        /// </summary>
        /// <param name="employee">员工信息</param>
        /// <returns></returns>
        [OperationContract]
        int AddEmployee(M7_Employee employee);

        /// <summary>
        /// 编辑员工
        /// </summary>
        /// <param name="employee">员工信息</param>
        /// <returns></returns>
        [OperationContract]
        int UpdateEmployee(M7_Employee employee);

        /// <summary>
        /// 删除员工
        /// </summary>
        /// <param name="employeeId">员工ID</param>
        /// <returns></returns>
        [OperationContract]
        int DeleteEmployee(long employeeId);
        #endregion

        #region ///Citizen

        /// <summary>
        /// 根据证件类型和证件号获取人员信息
        /// </summary>
        /// <param name="identityType">证件号类型ID</param>
        /// <param name="identityId">证件号</param>
        /// <returns></returns>
        [OperationContract]
        S7_Citizen GetCitizenByIdentityId(int identityTypeId, string identityId);

        /// <summary>
        /// 获取所有个人信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<S7_Citizen> GetCitizenList();

        /// <summary>
        /// 添加个人信息
        /// </summary>
        /// <param name="citizen">个人信息</param>
        /// <returns></returns>
        [OperationContract]
        int AddCitizen(S7_Citizen citizen);

        /// <summary>
        /// 编辑个人信息
        /// </summary>
        /// <param name="citizen">个人信息</param>
        /// <returns></returns>
        [OperationContract]
        int UpdateCitizen(S7_Citizen citizen);

        /// <summary>
        /// 删除个人信息
        /// </summary>
        /// <param name="citizenId">个人信息ID</param>
        /// <returns></returns>
        [OperationContract]
        int DeleteCitizen(string citizenId);
        #endregion

        #region ///Duty

        /// <summary>
        /// 获取职务列表
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_Duty> GetDutyList();
        #endregion

        #region ///Competence

        /// <summary>
        /// 获取职位等级列表
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_Competence> GetCompetenceList();
        #endregion

        #region ///Gender

        /// <summary>
        /// 获取性别列表
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_Gender> GetGenderList();
        #endregion

        #region ///IdentityType

        /// <summary>
        /// 获取证件类型
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_IdentityType> GetIdentityTypeList();
        #endregion

        #region///Recipe

        /// <summary>
        /// 获取处方中用药频次列表
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_FrequencyForRecipe> GetRecipeFrequencyList();

        /// <summary>
        /// 获取处方中给药途径列表
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_ApproachForRecipe> GetRecipeApproachList();

        #endregion
    }
}
